namespace Maple.Branch.Features.Services
{
    using System.Threading.Tasks;
    using IServices;
    using Volo.Abp.DependencyInjection;
    using Volo.Abp.Features;

    public class AbpFeatureStore : IFeatureStore, ITransientDependency
    {
        protected IBranchFeatureStore BranchFeatureStore { get; }

        public AbpFeatureStore(IBranchFeatureStore branchFeatureStore)
        {
            BranchFeatureStore = branchFeatureStore;
        }

        public virtual Task<string> GetOrNullAsync(
            string name,
            string providerName,
            string providerKey)
        {
            return BranchFeatureStore.GetOrNullAsync(name, providerName, providerKey);
        }
    }
}
